// systsem模块 路径
import Home from "@/view/home.vue"
import { RouteRecordRaw } from "vue-router"

const systemRouter: RouteRecordRaw =   // system
{
  path: '/system',
  name: 'system',
  component: Home,
  meta: {
    title: 'system',
    icon: 'Wallet',
    roles: ['admin', 'editor'],
    permission: "system:admin",
  },
  children: [
    // account
    {
      path: 'account',
      name: 'account',
      component: () => import('@/view/children/system/account.vue'),
      meta: {
        title: 'menus.wSystemManger',
        icon: 'User',
        permission: "system:admin:sysUser",
        roles: ['editor']
      }
    },
    // group
    {
      path: 'group',
      name: 'group',
      component: () => import('@/view/children/system/group.vue'),
      meta: {
        title: 'menus.wSystemRole',
        icon: 'Refrigerator',
        roles: ['admin'],
        permission: "system:admin:role",
      }
    },
    // task
    {
      path: 'task',
      name: 'task',
      component: () => import('@/view/children/system/task.vue'),
      meta: {
        title: 'menus.wSystemTask',
        icon: 'Clock',
        roles: ['editor'],
        permission: "system:admin:timingTask",
      }
    },
    // Setting
    {
      path: 'Setting',
      name: 'Setting',
      component: () => import('@/view/children/system/Setting.vue'),
      meta: {
        title: 'menus.wSystemSetting',
        icon: 'Setting',
        roles: ['admin'],
        permission: 'system:admin:config',
      }
    }
  ]
}

export default systemRouter